package net.zjitc.Student;

/**
 * @Author admin
 * @Date 2019/3/20 11:16
 *
 *    专科生
 */
public class CollegeStudent extends Student{

    CollegeStudent(){

    }

    public  CollegeStudent(String name){
        super(name);
        this.type="专科生";
    }
    @Override
    public  void calculateGrade(){
        double total=0;
        double average=0;
        for (int i=0;i<courses.length;i++){
            total+=courses[i];
        }
        average=total/courseNo;
        if (average>=80&&average<=100){
           this.courseGrade="优秀";
        }else if (average>=70){
            this.courseGrade="良好";
        }else if (average>=60){
            this.courseGrade="中等";
    }else if (average>=50){
        this.courseGrade="及格";
        }else {
            this.courseGrade="不及格";
        }
        System.out.print(courseGrade);
    }

}

